﻿@using Personalblog.Model.ViewModels;
@using Personalblog.Migrate
@model ColorfulButtonViewModel

@{
    var rnd = Random.Shared;
    var colorList = new[]
    {
        "text-bg-primary ",
        "text-bg-secondary",
        "text-bg-danger",
        "",
        "text-bg-warning",
        "text-bg-info",
        "text-bg-light",
        "text-bg-dark ",
    };
    var btnColor = colorList[rnd.Next(0, colorList.Length)];
}
<div class="card mb-3 box @btnColor" style="max-width: 360px;">
    <a href="@Model.Url" style="display:contents" target="@Model.Target" >
    <div class="row g-0">
        <div class="col-4">
            <div class="LinkBox  d-flex justify-content-center">
                <img src="@Model.favicon" class="img-fluid rounded-start" alt="...">
            </div>
        </div>
        <div class="col-8">
            <div class="card-body">
                <p class="card-title @btnColor" style="margin-bottom:5px;font-size: 1rem;">@Model.Name</p>
                <p class="card-text">
                    <span class="box-text @btnColor">
                        @Model.Description.Limit(25)
                    </span>
                </p>
            </div>
        </div>
    </div>
    </a>
</div>